#include <cpp_primer.h>

using namespace std;

int main()
{
    string name("BTG233");
    string numbers("0123456789");
    string::size_type pos = 0;
    // 每步循环查找name中的下一个数
    while((pos = name.find_first_of(numbers, pos)) != string::npos) {
        cout << "found number at index: " << pos
             << " element is " << name[pos] << endl;
        ++pos;
    }

    return 0;
}
